import sys
import logging

import sub.log
import sub2.log2
 
logging.basicConfig(filename='example.log',level=logging.DEBUG)
logging.debug('This message should go to the log file')
 
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
logging.debug('This message should appear on the console')
 
logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
logging.warning('is when this event was logged.')

logging.getLogger().handlers = []
logging.getLogger().setLevel(logging.CRITICAL)

logger = sub.log.getLogger()
logger.debug('this is debug info')
logger.info('this is information')
logger.warn('this is warning message')
logger.error('this is error message')
logger.fatal('this is fatal message, it is same as logger.critical')
logger.critical('this is critical message')


logger2 = sub2.log2.getLogger()
logger2.debug('this is debug info 2')
logger2.info('this is information 2')
logger2.warn('this is warning message 2')
logger2.error('this is error message 2')
logger2.fatal('this is fatal message, it is same as logger.critical 2')
logger2.critical('this is critical message 2')

